﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DA_CNPM
{
    public partial class formDangky : Form
    {
        public formDangky()
        {
            InitializeComponent();
            setCombobox();
        
        }

        private void setCombobox()
        {
            ComboboxItem item = new ComboboxItem();
            cbDay.Text = "ngày";
            int i;
            for (i = 1; i < 31 + 1; i++)
            {
                cbDay.Items.Add(i);
            }

            cbMonth.Text = "tháng";
            int j;
            for (j = 1; j < 12 + 1; j++)
            {
                cbMonth.Items.Add(j);
            }

            cbYear.Text = "năm";
            int k;
            for (k = 1980; k < 2014 + 1; k++)
            {
                cbYear.Items.Add(k);
            }
        }
        private void cbDay_SelectedIndexChanged(object sender, EventArgs e)
        {
            
        }

        private void cbMonth_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboboxItem item = new ComboboxItem();
            cbMonth.Text = "Chọn tháng";
            int i;
            for (i = 1; i < 12 + 1; i++)
            {
                cbMonth.Items.Add(i);
            }
        }

        private void cbYear_SelectedIndexChanged(object sender, EventArgs e)
        {
            cbYear.Text = "Chọn năm";
            int i;
            for (i = 1980; i < 2014 + 1; i++)
            {
                cbYear.Items.Add(i);
            }
        }

        private void label8_Click(object sender, EventArgs e)
        {

        }

        private void label11_Click(object sender, EventArgs e)
        {

        }

        private void label10_Click(object sender, EventArgs e)
        {

        }

        private void label12_Click(object sender, EventArgs e)
        {

        }

       
    }
    public class ComboboxItem
    {
        public string Text { get; set; }
        public object Value { get; set; }

        public override string ToString()
        {
            return Text;
        }
    }
}
